package org.dizem.IntelliPainter.ui

/**
 * Created by IntelliJ IDEA.
 * User: dizem
 * Date: 2010-9-24
 * Time: 12:05:14
 */
class CountProject {

	static int lines = 0;
	static int files = 0;
	static void count(File f) {
		if(f.isDirectory()) {
			for(file in f.listFiles())
				count(file);
		} else {

			++files;
			int l = 0;
			f.eachLine { ++l; }
			String s = f.toString().substring(f.toString().indexOf("org\\"))
			println s;
			lines += l
		}
	}

	public static void main(String[] args) {
		count(new File("H:\\IntelliPainter\\src"))
		println """
Total:
	lines = $lines
	files = $files
		"""
	}
}
